home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / restore.mrbk < prev    next >
Text File  |  1996-09-26  |  1KB  |  64 lines

  1. /* restore.mrbk */
  2.  
  3. /* This ARexx program is a simple-minded restore script. It has hard-wired
  4.  * parameter settings which could give way to command-line options. It is
  5.  * also hard-wired to the first instance of MRBackup, though it doesn't
  6.  * need to be.
  7.  */
  8.  
  9. signal on ERROR
  10. signal on BREAK_C
  11.  
  12. options results
  13.  
  14. if ~(Show('P', 'MRBackup_#1')) then do
  15.     say "You must run MRBackup first. With a little work, you could"
  16.     say "get this ARexx script to do it for you."
  17.     exit 1
  18. end
  19.  
  20. address "MRBackup_#1"
  21.  
  22. poptofront
  23.  
  24. backpath = "DF0:"
  25. setbackpath backpath
  26. if rc ~= 0 then do
  27.     say "Failed to set backup path to " || backpath
  28.     exit 1
  29. end
  30.  
  31. homepath = "DH0:"
  32. sethomepath homepath
  33. if rc ~= 0 then do
  34.     say "Failed to set home path to " || homepath
  35.     exit 1
  36. end
  37.  
  38. restore
  39.  
  40. if rc ~= 0 then do
  41.     say "Restore failed; error code: " || rc
  42.     exit 1
  43. end
  44.  
  45. exit 0
  46.  
  47.  
  48. /*------------------------------------------------------------------*/
  49.  
  50. break_c:
  51.  
  52. say "*** Control-C recieved.  Stopped by user. ***"
  53. exit 5
  54.  
  55. /*------------------------------------------------------------------*/
  56.  
  57. error:
  58.  
  59. say "Error"
  60. exit 6
  61.  
  62. /*------------------------------------------------------------------*/
  63.  
  64.